<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>设置抢票信息</title>
    <style>
        body {
            height: 100vh;
            margin: 0;
            padding: 0;
            background-color: rgb(255, 255, 255);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        .container {
            width: 300px;
            height: 300px;
            background-color: rgb(227, 223, 223);
            border-radius: 10px;
            padding: 20px;
        }

        input {
            width: 200px;
            height: 30px;
            border-radius: 5px;
            border: 1px solid rgb(199, 199, 199);
            margin-top: 10px;
            padding-left: 5px;
        }

        button {
            width: 100px;
            height: 30px;
            margin-top: 20px;
            position: absolute;
            left: 50%;
            transform: translate(-50%);
        }
    </style>
    <script>
        window.onload = function () {
            addKeyDown(document.getElementById("session"), document.getElementById("Vip"), document.getElementById("noVip"), document.getElementById("teamType"));
        }

        function addKeyDown(...eles) {
            for (const ele of eles) {
                ele.addEventListener("keydown", function (event) {
                    if (event.key === "Tab") {
                        ele.value = ele.getAttribute("placeholder");
                    }
                });
            }
        }


        function start() {
            var name = document.getElementById("name").value;
            var day = document.getElementById("day").value;
            var session = document.getElementById("session").value.replace("：", ":");
            var Vip = document.getElementById("Vip").value;
            var noVip = document.getElementById("noVip").value;
            var teamType = document.getElementById("teamType").value;
            console.log(name, day, session, Vip, noVip, teamType);
            window.option_API.start(name, day, session, Vip, noVip, teamType);
        }
    </script>
</head>

<body>
    <div class="container">
        <span>导游姓名 </span><input type="text" id="name" placeholder="XXX"><br>
        <span>抢票日期 </span><input type="text" id="day" placeholder="21"><br>
        <span>抢票场次 </span><input type="text" id="session" placeholder="14:00-15:00"><br>
        <span>贵宾席位</span> <input type="text" id="Vip" placeholder="0"><br>
        <span>观众席位 </span><input type="text" id="noVip" placeholder="52"><br>
        <span>团队类型 </span> <input type="text" id="teamType" placeholder="成人团"><br>
        <button onclick="start()">开始</button>
    </div>
</body>

</html>